#ifndef ONE_PICTURE_VIDEO_H
#define ONE_PICTURE_VIDEO_H

#include <QWidget>
extern "C" {
    #include <libavcodec/avcodec.h>
    #include <libavformat/avformat.h>
    #include <libswscale/swscale.h>
    #include <libavdevice/avdevice.h>
    #include <libavformat/version.h>
    #include <libavutil/time.h>
    #include <libavutil/mathematics.h>
}
#include<qdebug.h>
#include<qfiledialog.h>
#include<qwidget.h>
#include<QPainter>
#include<QBrush>
#include<QColor>
#include<QObject>
#include<QImage>
#include<QPainter>
#include<QPen>
#include<QFont>
#include<QFile>
#include<addyiping.h>
#include<qtimer.h>

namespace Ui {
class one_picture_video;
}

class one_picture_video : public QWidget
{
    Q_OBJECT

public:
    explicit one_picture_video(QWidget *parent = nullptr);
    ~one_picture_video();
    void setoutfilename(QString outfile);
    bool DeleteFileOrFolder(const QString &strPath);


private slots:
    void on_pushButton_clicked();
    void addyinping();

    void on_pushButton_2_clicked();
    void on_pushButton_3_clicked();
    void slot_showprocrss(double time);

signals:
    void signal_create_over();
    void signal_showprocrss(double time);
private:
    Ui::one_picture_video *ui;
    QString filename;
    QString outfilename;
    QString yinpingfile;
    QImage img;

    int id;
    double time;

    QTimer timer;
};

#endif // ONE_PICTURE_VIDEO_H
